BlitImageAlpha50Colour
BlitImageAlpha50Colour ThisImage, Xpos, Ypos, BlendColour
 
Parameters:

    ThisImage = The Index of the image you wish to draw
    Xpos = The X coordinate to draw this image
    Ypos = The Y coordinate to draw this image
    BlendColour = The RGB Colour to blend this surface with after it's been drawn
Returns: NONE
 

     BlitImageAlpha50Colour is similar to the DrawImage function, except it has post processing. What it does, is it draws the selected image, but it also performs a 50% Alpha Blend between the image and your selected colour. So it's the equivalent using DrawImage to first draw the image as is, then going back drawing a BOX with an Alpha50 InkMode over the image.. Which is often used to create 'blurring/motion' effects.

      The combined processing is not just to save you a few lines of code, it's actually a more optimal way of performing this action.



FACTS:


     * BlitImageAlpha50Colour alters the source image.

     * BlitImageAlpha50Colour is only intend for drawing FX or AFX formatted image surfaces.

     * BlitImageAlpha50Colour doesn't support mask & alpha channel transparency.



 
Example Source: Download This Example
; Inlude the Blit Image functions
  #Include "BlitImage"
  
  
; Create an FX image the size of the screen
  MyImage=NewFXImage(GetScreenWidth(),GetScreenHeight())
  
  
  
; Set Fps of the program
  SetFPS 30
  
; enable Vsync to remove any tearing from the refresh
  ScreenVsync on
  
; Start of Demo loop
  Do
     
   ; redirect all drawing to this image
     RenderToImage MyImage
     
     
   ;Change the pen's ink mode to Alpha ADD
     InkMode 1+64
     
     
   ; draw a circle at the mouses current position
     CircleC MouseX(),MouseY(),100true,$803030
     
   ; redirect all drawing to screen back buffer
     RenderToScreen
     
   ; To do combined Blit (copy) our Image, with combined CLS of image.
   ; to the PB screen
     BlitImageAlpha50Colour(MyImage,0,0,RGB(50,50,50))
     
     
     
   ; Display Message
     Text 0,0,"USing BlitImageAlpha50Colour to create a blur effect"
     
   ; flip the back buffer to the front, so the user can see it
     Sync
     
  Loop
  
  
 
Related Info: BlitImageClear | Box | DrawAlphaImage | DrawImage | InkMode :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com